package tsp.cn.http;

import tsp.cn.http.tools.PreferenceUtils;

/**
 * 网路配置
 * Created by wds on 2016/10/17.
 */

public class HttpConfig {

    // 服务器IP
   // public final static String IP = "http://tsp20.chinatsp.com/";
    //public final static String IP = "http://bqtest.yttsp.com/";
   /*
    public static String appendString2() {

        StringBuilder strBuilder = new StringBuilder();
        strBuilder.append(HttpConfig.IP);
        strBuilder.append("100");
        strBuilder.append("/1.0/tu/");
        strBuilder.append("10001013111111111111111111111111/");
        return strBuilder.toString();
    }*/
    

    /**
     * URL 通用的拼接函数
     * @return
     */
    public static String appendString() {
        String factory_code = PreferenceUtils.getPreference("factory_code");
        String ucs_api_host = PreferenceUtils.getPreference("ucs_api_host");
        String tuid_sv = PreferenceUtils.getPreference("tuid_sv");
        
        StringBuilder strBuilder = new StringBuilder();
        strBuilder.append("http://");
        strBuilder.append(ucs_api_host); 
  

        strBuilder.append("/");		
        strBuilder.append(factory_code);
        strBuilder.append("/1.0/tu/");
        strBuilder.append(tuid_sv); 
        strBuilder.append("/"); 
        return strBuilder.toString();
    }
}
